import datetime
import glob
import os
import re

print("""/*
 * Cppcheck - A tool for static C/C++ code analysis
 * Copyright (C) 2007-%i Cppcheck team.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

// This file is auto-generated by tools/get_checkers.py:
// python3 tools/get_checkers.py > lib/checkers.cpp

#include "checkers.h"

namespace checkers {
    const std::map<std::string, std::string> allCheckers{""" % (datetime.date.today().year,))

for filename in glob.glob(os.path.expanduser('~/cppchecksolutions/cppcheck/lib/*.cpp')):
    for line in open(filename,'rt'):
        res = re.match(r'[ \t]*logChecker\(\s*"([:_a-zA-Z0-9]+)"\s*\);.*', line)
        if res is None:
            continue
        req = ''
        if line.find('//')>0:
            req = line[line.find('//')+2:].strip()
        print('        {"%s","%s"},' % (res.group(1), req))
print("    };\n")

print('    const std::map<std::string, std::string> premiumCheckers{')
premium_checkers = []
for filename in sorted(glob.glob(os.path.expanduser('~/cppchecksolutions/addon/src/*.cpp'))):
    for line in open(filename,'rt'):
        res = re.match(r'[ \t]*logChecker\("([^"]+)"\);.*', line)
        if res is None:
            continue
        if line.find('//') > 0:
            req = line[line.find('//')+2:].strip()
        else:
            req = ''
        premium_checkers.append('        {"%s","%s"}' % (res.group(1), req))
print(',\n'.join(sorted(premium_checkers)))
print('    };')


print("""
    const char Req[] = "Required";
    const char Adv[] = "Advisory";
    const char Man[] = "Mandatory";
    const char Doc[] = "Document";

    const std::vector<MisraInfo> misraC2012Directives =
    {
        {1,1,Req,0},
        {2,1,Req,0},
        {3,1,Req,0},
        {4,1,Req,0},
        {4,2,Adv,0},
        {4,3,Req,0},
        {4,4,Adv,0},
        {4,5,Adv,0},
        {4,6,Adv,3},
        {4,7,Req,0},
        {4,8,Adv,0},
        {4,9,Adv,3},
        {4,10,Req,0},
        {4,11,Req,3},
        {4,12,Req,0},
        {4,13,Adv,0},
        {4,14,Req,2},
        {4,15,Req,3},
        {5,1,Req,4},
        {5,2,Req,4},
        {5,3,Req,4},
    };

    const std::vector<MisraInfo> misraC2012Rules =
    {
        {1,1,Req,0},
        {1,2,Adv,0},
        {1,3,Req,0},
        {1,4,Req,2}, // amendment 2
        {1,5,Req,3}, // Amendment 3
        {2,1,Req,0},
        {2,2,Req,0},
        {2,3,Adv,0},
        {2,4,Adv,0},
        {2,5,Adv,0},
        {2,6,Adv,0},
        {2,7,Adv,0},
        {2,8,Adv,0},
        {3,1,Req,0},
        {3,2,Req,0},
        {4,1,Req,0},
        {4,2,Adv,0},
        {5,1,Req,0},
        {5,2,Req,0},
        {5,3,Req,0},
        {5,4,Req,0},
        {5,5,Req,0},
        {5,6,Req,0},
        {5,7,Req,0},
        {5,8,Req,0},
        {5,9,Adv,0},
        {6,1,Req,0},
        {6,2,Req,0},
        {6,3,Req,0},
        {7,1,Req,0},
        {7,2,Req,0},
        {7,3,Req,0},
        {7,4,Req,0},
        {7,5,Man,0},
        {7,6,Req,0},
        {8,1,Req,0},
        {8,2,Req,0},
        {8,3,Req,0},
        {8,4,Req,0},
        {8,5,Req,0},
        {8,6,Req,0},
        {8,7,Adv,0},
        {8,8,Req,0},
        {8,9,Adv,0},
        {8,10,Req,0},
        {8,11,Adv,0},
        {8,12,Req,0},
        {8,13,Adv,0},
        {8,14,Req,0},
        {8,15,Req,0},
        {8,16,Adv,0},
        {8,17,Adv,0},
        {9,1,Man,0},
        {9,2,Req,0},
        {9,3,Req,0},
        {9,4,Req,0},
        {9,5,Req,0},
        {9,6,Req,0},
        {9,7,Man,0},
        {10,1,Req,0},
        {10,2,Req,0},
        {10,3,Req,0},
        {10,4,Req,0},
        {10,5,Adv,0},
        {10,6,Req,0},
        {10,7,Req,0},
        {10,8,Req,0},
        {11,1,Req,0},
        {11,2,Req,0},
        {11,3,Req,0},
        {11,4,Adv,0},
        {11,5,Adv,0},
        {11,6,Req,0},
        {11,7,Req,0},
        {11,8,Req,0},
        {11,9,Req,0},
        {11,10,Req,0},
        {12,1,Adv,0},
        {12,2,Req,0},
        {12,3,Adv,0},
        {12,4,Adv,0},
        {12,5,Man,1}, // amendment 1
        {12,6,Req,4}, // amendment 4
        {13,1,Req,0},
        {13,2,Req,0},
        {13,3,Adv,0},
        {13,4,Adv,0},
        {13,5,Req,0},
        {13,6,Man,0},
        {14,1,Req,0},
        {14,2,Req,0},
        {14,3,Req,0},
        {14,4,Req,0},
        {15,1,Adv,0},
        {15,2,Req,0},
        {15,3,Req,0},
        {15,4,Adv,0},
        {15,5,Adv,0},
        {15,6,Req,0},
        {15,7,Req,0},
        {16,1,Req,0},
        {16,2,Req,0},
        {16,3,Req,0},
        {16,4,Req,0},
        {16,5,Req,0},
        {16,6,Req,0},
        {16,7,Req,0},
        {17,1,Req,0},
        {17,2,Req,0},
        {17,3,Man,0},
        {17,4,Man,0},
        {17,5,Adv,0},
        {17,6,Man,0},
        {17,7,Req,0},
        {17,8,Adv,0},
        {17,9,Man,0},
        {17,10,Req,0},
        {17,11,Adv,0},
        {17,12,Adv,0},
        {17,13,Req,0},
        {18,1,Req,0},
        {18,2,Req,0},
        {18,3,Req,0},
        {18,4,Adv,0},
        {18,5,Adv,0},
        {18,6,Req,0},
        {18,7,Req,0},
        {18,8,Req,0},
        {18,9,Req,0},
        {18,10,Man,0},
        {19,1,Man,0},
        {19,2,Adv,0},
        {20,1,Adv,0},
        {20,2,Req,0},
        {20,3,Req,0},
        {20,4,Req,0},
        {20,5,Adv,0},
        {20,6,Req,0},
        {20,7,Req,0},
        {20,8,Req,0},
        {20,9,Req,0},
        {20,10,Adv,0},
        {20,11,Req,0},
        {20,12,Req,0},
        {20,13,Req,0},
        {20,14,Req,0},
        {21,1,Req,0},
        {21,2,Req,0},
        {21,3,Req,0},
        {21,4,Req,0},
        {21,5,Req,0},
        {21,6,Req,0},
        {21,7,Req,0},
        {21,8,Req,0},
        {21,9,Req,0},
        {21,10,Req,0},
        {21,11,Req,0},
        {21,12,Adv,0},
        {21,13,Man,1}, // Amendment 1
        {21,14,Req,1}, // Amendment 1
        {21,15,Req,1}, // Amendment 1
        {21,16,Req,1}, // Amendment 1
        {21,17,Req,1}, // Amendment 1
        {21,18,Man,1}, // Amendment 1
        {21,19,Man,1}, // Amendment 1
        {21,20,Man,1}, // Amendment 1
        {21,21,Req,3}, // Amendment 3
        {21,22,Man,3}, // Amendment 3
        {21,23,Req,3}, // Amendment 3
        {21,24,Req,3}, // Amendment 3
        {21,25,Req,4}, // Amendment 4
        {21,26,Req,4}, // Amendment 4
        {22,1,Req,0},
        {22,2,Man,0},
        {22,3,Req,0},
        {22,4,Man,0},
        {22,5,Man,0},
        {22,6,Man,0},
        {22,7,Req,1}, // Amendment 1
        {22,8,Req,1}, // Amendment 1
        {22,9,Req,1}, // Amendment 1
        {22,10,Req,1}, // Amendment 1
        {22,11,Req,4}, // Amendment 4
        {22,12,Man,4}, // Amendment 4
        {22,13,Req,4}, // Amendment 4
        {22,14,Man,4}, // Amendment 4
        {22,15,Req,4}, // Amendment 4
        {22,16,Req,4}, // Amendment 4
        {22,17,Req,4}, // Amendment 4
        {22,18,Req,4}, // Amendment 4
        {22,19,Req,4}, // Amendment 4
        {22,20,Man,4}, // Amendment 4
        {23,1,Adv,3}, // Amendment 3
        {23,2,Req,3}, // Amendment 3
        {23,3,Adv,3}, // Amendment 3
        {23,4,Req,3}, // Amendment 3
        {23,5,Adv,3}, // Amendment 3
        {23,6,Req,3}, // Amendment 3
        {23,7,Adv,3}, // Amendment 3
        {23,8,Req,3}, // Amendment 3
    };

    const std::map<std::string, std::string> misraRuleSeverity{
        {"1.1", "error"}, //{"syntaxError", "unknownMacro"}},
        {"1.3", "error"}, //most "error"
        {"2.1", "style"}, //{"alwaysFalse", "duplicateBreak"}},
        {"2.2", "style"}, //{"alwaysTrue", "redundantCondition", "redundantAssignment", "redundantAssignInSwitch", "unreadVariable"}},
        {"2.6", "style"}, //{"unusedLabel"}},
        {"2.8", "style"}, //{"unusedVariable"}},
        {"5.3", "style"}, //{"shadowVariable"}},
        {"8.3", "style"}, //{"funcArgNamesDifferent"}}, // inconclusive
        {"8.13", "style"}, //{"constPointer"}},
        {"9.1", "error"}, //{"uninitvar"}},
        {"14.3", "style"}, //{"alwaysTrue", "alwaysFalse", "compareValueOutOfTypeRangeError", "knownConditionTrueFalse"}},
        {"13.2", "error"}, //{"unknownEvaluationOrder"}},
        {"13.6", "style"}, //{"sizeofCalculation"}},
        {"17.4", "error"}, //{"missingReturn"}},
        {"17.5", "warning"}, //{"argumentSize"}},
        {"18.1", "error"}, //{"pointerOutOfBounds"}},
        {"18.2", "error"}, //{"comparePointers"}},
        {"18.3", "error"}, //{"comparePointers"}},
        {"18.6", "error"}, //{"danglingLifetime"}},
        {"19.1", "error"}, //{"overlappingWriteUnion", "overlappingWriteFunction"}},
        {"20.6", "error"}, //{"preprocessorErrorDirective"}},
        {"21.13", "error"}, //{"invalidFunctionArg"}},
        {"21.17", "error"}, //{"bufferAccessOutOfBounds"}},
        {"21.18", "error"}, //{"bufferAccessOutOfBounds"}},
        {"22.1", "error"}, //{"memleak", "resourceLeak", "memleakOnRealloc", "leakReturnValNotUsed", "leakNoVarFunctionCall"}},
        {"22.2", "error"}, //{"autovarInvalidDeallocation"}},
        {"22.3", "error"}, //{"incompatibleFileOpen"}},
        {"22.4", "error"}, //{"writeReadOnlyFile"}},
        {"22.6", "error"}, //{"useClosedFile"}}
    };

    const std::vector<MisraCppInfo> misraCpp2008Rules =
    {
        {0,1,1,Req},
        {0,1,2,Req},
        {0,1,3,Req},
        {0,1,4,Req},
        {0,1,5,Req},
        {0,1,6,Req},
        {0,1,7,Req},
        {0,1,8,Req},
        {0,1,9,Req},
        {0,1,10,Req},
        {0,1,11,Req},
        {0,1,12,Req},
        {0,2,1,Req},
        {0,3,1,Doc},
        {0,3,2,Req},
        {0,4,1,Doc},
        {0,4,2,Doc},
        {0,4,3,Doc},
        {1,0,1,Req},
        {1,0,2,Doc},
        {1,0,3,Doc},
        {2,2,1,Doc},
        {2,3,1,Req},
        {2,5,1,Adv},
        {2,7,1,Req},
        {2,7,2,Req},
        {2,7,3,Adv},
        {2,10,1,Req},
        {2,10,2,Req},
        {2,10,3,Req},
        {2,10,4,Req},
        {2,10,5,Adv},
        {2,10,6,Req},
        {2,13,1,Req},
        {2,13,2,Req},
        {2,13,3,Req},
        {2,13,4,Req},
        {2,13,5,Req},
        {3,1,1,Req},
        {3,1,2,Req},
        {3,1,3,Req},
        {3,2,1,Req},
        {3,2,2,Req},
        {3,2,3,Req},
        {3,2,4,Req},
        {3,3,1,Req},
        {3,3,2,Req},
        {3,4,1,Req},
        {3,9,1,Req},
        {3,9,2,Adv},
        {3,9,3,Req},
        {4,5,1,Req},
        {4,5,2,Req},
        {4,5,3,Req},
        {4,10,1,Req},
        {4,10,2,Req},
        {5,0,1,Req},
        {5,0,2,Adv},
        {5,0,3,Req},
        {5,0,4,Req},
        {5,0,5,Req},
        {5,0,6,Req},
        {5,0,7,Req},
        {5,0,8,Req},
        {5,0,9,Req},
        {5,0,10,Req},
        {5,0,11,Req},
        {5,0,12,Req},
        {5,0,13,Req},
        {5,0,14,Req},
        {5,0,15,Req},
        {5,0,16,Req},
        {5,0,17,Req},
        {5,0,18,Req},
        {5,0,19,Req},
        {5,0,20,Req},
        {5,0,21,Req},
        {5,2,1,Req},
        {5,2,2,Req},
        {5,2,3,Adv},
        {5,2,4,Req},
        {5,2,5,Req},
        {5,2,6,Req},
        {5,2,7,Req},
        {5,2,8,Req},
        {5,2,9,Adv},
        {5,2,10,Adv},
        {5,2,11,Req},
        {5,2,12,Req},
        {5,3,1,Req},
        {5,3,2,Req},
        {5,3,3,Req},
        {5,3,4,Req},
        {5,8,1,Req},
        {5,14,1,Req},
        {5,17,1,Req},
        {5,18,1,Req},
        {5,19,1,Adv},
        {6,2,1,Req},
        {6,2,2,Req},
        {6,2,3,Req},
        {6,3,1,Req},
        {6,4,1,Req},
        {6,4,2,Req},
        {6,4,3,Req},
        {6,4,4,Req},
        {6,4,5,Req},
        {6,4,6,Req},
        {6,4,7,Req},
        {6,4,8,Req},
        {6,5,1,Req},
        {6,5,2,Req},
        {6,5,3,Req},
        {6,5,4,Req},
        {6,5,5,Req},
        {6,5,6,Req},
        {6,6,1,Req},
        {6,6,2,Req},
        {6,6,3,Req},
        {6,6,4,Req},
        {6,6,5,Req},
        {7,1,1,Req},
        {7,1,2,Req},
        {7,2,1,Req},
        {7,3,1,Req},
        {7,3,2,Req},
        {7,3,3,Req},
        {7,3,4,Req},
        {7,3,5,Req},
        {7,3,6,Req},
        {7,4,1,Doc},
        {7,4,2,Req},
        {7,4,3,Req},
        {7,5,1,Req},
        {7,5,2,Req},
        {7,5,3,Req},
        {7,5,4,Adv},
        {8,4,1,Req},
        {8,4,2,Req},
        {8,4,3,Req},
        {8,4,4,Req},
        {8,5,1,Req},
        {8,5,2,Req},
        {8,5,3,Req},
        {9,3,1,Req},
        {9,3,2,Req},
        {9,3,3,Req},
        {9,5,1,Req},
        {9,6,1,Doc},
        {9,6,2,Req},
        {9,6,3,Req},
        {9,6,4,Req},
        {10,1,1,Adv},
        {10,1,2,Req},
        {10,1,3,Req},
        {10,2,1,Adv},
        {10,3,1,Req},
        {10,3,2,Req},
        {10,3,3,Req},
        {11,0,1,Req},
        {12,1,1,Req},
        {12,1,2,Adv},
        {12,1,3,Req},
        {12,8,1,Req},
        {12,8,2,Req},
        {14,5,1,Req},
        {14,5,2,Req},
        {14,5,3,Req},
        {14,6,1,Req},
        {14,6,2,Req},
        {14,7,1,Req},
        {14,7,2,Req},
        {14,7,3,Req},
        {14,8,1,Req},
        {14,8,2,Req},
        {15,0,1,Req},
        {15,0,2,Req},
        {15,0,3,Req},
        {15,1,1,Req},
        {15,1,2,Req},
        {15,1,3,Req},
        {15,3,1,Req},
        {15,3,2,Adv},
        {15,3,3,Req},
        {15,3,4,Req},
        {15,3,5,Req},
        {15,3,6,Req},
        {15,3,7,Req},
        {15,4,1,Req},
        {15,5,1,Req},
        {15,5,2,Req},
        {15,5,3,Req},
        {16,0,1,Req},
        {16,0,2,Req},
        {16,0,3,Req},
        {16,0,4,Req},
        {16,0,5,Req},
        {16,0,6,Req},
        {16,0,7,Req},
        {16,0,8,Req},
        {16,1,1,Req},
        {16,1,2,Req},
        {16,2,1,Req},
        {16,2,2,Req},
        {16,2,3,Req},
        {16,2,4,Req},
        {16,2,5,Adv},
        {16,2,6,Req},
        {16,3,1,Req},
        {16,3,2,Adv},
        {16,6,1,Doc},
        {17,0,1,Req},
        {17,0,2,Req},
        {17,0,3,Req},
        {17,0,4,Doc},
        {17,0,5,Req},
        {18,0,1,Req},
        {18,0,2,Req},
        {18,0,3,Req},
        {18,0,4,Req},
        {18,0,5,Req},
        {18,2,1,Req},
        {18,4,1,Req},
        {18,7,1,Req},
        {19,3,1,Req},
        {27,0,1,Req}
    };

    const std::vector<MisraCppInfo> misraCpp2023Rules =
    {
        {0,0,1,Req},
        {0,0,2,Adv},
        {0,1,1,Adv},
        {0,1,2,Req},
        {0,2,1,Adv},
        {0,2,2,Req},
        {0,2,3,Adv},
        {0,2,4,Adv},
        {0,3,1,Adv},
        {0,3,2,Req},
        {4,1,1,Req},
        {4,1,2,Adv},
        {4,1,3,Req},
        {4,6,1,Req},
        {5,0,1,Adv},
        {5,7,1,Req},
        {5,7,2,Adv},
        {5,7,3,Req},
        {5,10,1,Req},
        {5,13,1,Req},
        {5,13,2,Req},
        {5,13,3,Req},
        {5,13,4,Req},
        {5,13,5,Req},
        {5,13,6,Req},
        {5,13,7,Req},
        {6,0,1,Req},
        {6,0,2,Adv},
        {6,0,3,Adv},
        {6,0,4,Req},
        {6,2,1,Req},
        {6,2,2,Req},
        {6,2,3,Req},
        {6,2,4,Req},
        {6,4,1,Req},
        {6,4,2,Req},
        {6,4,3,Req},
        {6,5,1,Adv},
        {6,5,2,Adv},
        {6,7,1,Req},
        {6,7,2,Req},
        {6,8,1,Req},
        {6,8,2,Man},
        {6,8,3,Req},
        {6,8,4,Adv},
        {6,9,1,Req},
        {6,9,2,Adv},
        {7,0,1,Req},
        {7,0,2,Req},
        {7,0,3,Req},
        {7,0,4,Req},
        {7,0,5,Req},
        {7,0,6,Req},
        {7,11,1,Req},
        {7,11,2,Req},
        {7,11,3,Req},
        {8,0,1,Adv},
        {8,1,1,Req},
        {8,1,2,Adv},
        {8,2,1,Req},
        {8,2,2,Req},
        {8,2,3,Req},
        {8,2,4,Req},
        {8,2,5,Req},
        {8,2,6,Req},
        {8,2,7,Adv},
        {8,2,8,Req},
        {8,2,9,Req},
        {8,2,10,Req},
        {8,2,11,Req},
        {8,3,1,Adv},
        {8,3,2,Adv},
        {8,7,1,Req},
        {8,7,2,Req},
        {8,9,1,Req},
        {8,14,1,Adv},
        {8,18,1,Man},
        {8,18,2,Adv},
        {8,19,1,Adv},
        {8,20,1,Adv},
        {9,2,1,Req},
        {9,3,1,Req},
        {9,4,1,Req},
        {9,4,2,Req},
        {9,5,2,Adv},
        {9,5,3,Req},
        {9,6,1,Adv},
        {9,6,2,Req},
        {9,6,3,Req},
        {9,6,4,Req},
        {9,6,5,Req},
        {10,0,1,Adv},
        {10,1,1,Adv},
        {10,1,2,Req},
        {10,2,1,Req},
        {10,2,2,Adv},
        {10,2,3,Req},
        {10,3,1,Adv},
        {10,4,1,Req},
        {11,3,1,Adv},
        {11,3,2,Adv},
        {11,6,1,Adv},
        {11,6,2,Man},
        {11,6,3,Req},
        {12,2,1,Adv},
        {12,2,2,Req},
        {12,2,3,Req},
        {12,3,1,Req},
        {13,1,1,Adv},
        {13,1,2,Req},
        {13,3,1,Req},
        {13,3,2,Req},
        {13,3,3,Req},
        {13,3,4,Req},
        {14,1,1,Adv},
        {15,0,1,Req},
        {15,0,2,Adv},
        {15,1,1,Req},
        {15,1,2,Adv},
        {15,1,3,Req},
        {15,1,4,Adv},
        {15,1,5,Req},
        {15,8,1,Req},
        {16,5,2,Req},
        {16,6,1,Adv},
        {17,8,1,Req},
        {18,1,1,Req},
        {18,1,2,Req},
        {18,3,1,Adv},
        {18,3,2,Req},
        {18,3,3,Req},
        {18,4,1,Req},
        {18,5,1,Adv},
        {18,5,2,Adv},
        {19,0,1,Req},
        {19,0,2,Req},
        {19,0,3,Adv},
        {19,0,4,Adv},
        {19,1,1,Req},
        {19,1,2,Req},
        {19,1,3,Req},
        {19,2,1,Req},
        {19,2,2,Req},
        {19,2,3,Req},
        {19,3,1,Adv},
        {19,3,2,Req},
        {19,3,3,Req},
        {19,3,4,Req},
        {19,3,5,Req},
        {19,6,1,Adv},
        {21,2,1,Req},
        {21,2,2,Req},
        {21,2,3,Req},
        {21,2,4,Req},
        {21,6,1,Adv},
        {21,6,2,Req},
        {21,6,3,Req},
        {21,6,4,Req},
        {21,6,5,Req},
        {21,10,1,Req},
        {21,10,2,Req},
        {21,10,3,Req},
        {22,3,1,Req},
        {22,4,1,Req},
        {23,11,1,Adv},
        {24,5,1,Req},
        {24,5,2,Req},
        {25,5,1,Req},
        {25,5,2,Man},
        {25,5,3,Man},
        {26,3,1,Adv},
        {28,3,1,Req},
        {28,6,1,Req},
        {28,6,2,Req},
        {28,6,3,Req},
        {28,6,4,Req},
        {30,0,1,Req},
        {30,0,2,Req}
    };
}

std::vector<checkers::Info> checkers::autosarInfo{
    {"m0-1-1", checkers::Req},
    {"m0-1-2", checkers::Req},
    {"m0-1-3", checkers::Req},
    {"m0-1-4", checkers::Req},
    {"a0-1-1", checkers::Req},
    {"a0-1-2", checkers::Req},
    {"m0-1-8", checkers::Req},
    {"m0-1-9", checkers::Req},
    {"m0-1-10", checkers::Adv},
    {"a0-1-3", checkers::Req},
    {"a0-1-4", checkers::Req},
    {"a0-1-5", checkers::Req},
    {"a0-1-6", checkers::Adv},
    {"m0-2-1", checkers::Req},
    {"a0-4-2", checkers::Req},
    {"a0-4-3", checkers::Req},
    {"a0-4-4", checkers::Req},
    {"a1-1-1", checkers::Req},
    {"a1-4-3", checkers::Adv},
    {"a2-3-1", checkers::Req},
    {"a2-5-1", checkers::Req},
    {"a2-5-2", checkers::Req},
    {"m2-7-1", checkers::Req},
    {"a2-7-1", checkers::Req},
    {"a2-7-3", checkers::Req},
    {"a2-8-2", checkers::Adv},
    {"m2-10-1", checkers::Req},
    {"a2-10-1", checkers::Req},
    {"a2-10-6", checkers::Req},
    {"a2-10-4", checkers::Req},
    {"a2-10-5", checkers::Adv},
    {"a2-11-1", checkers::Req},
    {"a2-13-1", checkers::Req},
    {"a2-13-6", checkers::Req},
    {"a2-13-5", checkers::Adv},
    {"m2-13-2", checkers::Req},
    {"m2-13-3", checkers::Req},
    {"m2-13-4", checkers::Req},
    {"a2-13-2", checkers::Req},
    {"a2-13-3", checkers::Req},
    {"a2-13-4", checkers::Req},
    {"a3-1-1", checkers::Req},
    {"a3-1-2", checkers::Req},
    {"a3-1-3", checkers::Adv},
    {"m3-1-2", checkers::Req},
    {"a3-1-4", checkers::Req},
    {"a3-1-6", checkers::Adv},
    {"m3-2-1", checkers::Req},
    {"m3-2-2", checkers::Req},
    {"m3-2-3", checkers::Req},
    {"m3-2-4", checkers::Req},
    {"a3-3-1", checkers::Req},
    {"a3-3-2", checkers::Req},
    {"m3-3-2", checkers::Req},
    {"m3-4-1", checkers::Req},
    {"m3-9-1", checkers::Req},
    {"a3-9-1", checkers::Req},
    {"m3-9-3", checkers::Req},
    {"m4-5-1", checkers::Req},
    {"a4-5-1", checkers::Req},
    {"m4-5-3", checkers::Req},
    {"a4-7-1", checkers::Req},
    {"m4-10-1", checkers::Req},
    {"a4-10-1", checkers::Req},
    {"m4-10-2", checkers::Req},
    {"a5-0-1", checkers::Req},
    {"m5-0-2", checkers::Adv},
    {"m5-0-3", checkers::Req},
    {"m5-0-4", checkers::Req},
    {"m5-0-5", checkers::Req},
    {"m5-0-6", checkers::Req},
    {"m5-0-7", checkers::Req},
    {"m5-0-8", checkers::Req},
    {"m5-0-9", checkers::Req},
    {"m5-0-10", checkers::Req},
    {"m5-0-11", checkers::Req},
    {"m5-0-12", checkers::Req},
    {"a5-0-2", checkers::Req},
    {"m5-0-14", checkers::Req},
    {"m5-0-15", checkers::Req},
    {"m5-0-16", checkers::Req},
    {"m5-0-17", checkers::Req},
    {"a5-0-4", checkers::Req},
    {"m5-0-18", checkers::Req},
    {"a5-0-3", checkers::Req},
    {"m5-0-20", checkers::Req},
    {"m5-0-21", checkers::Req},
    {"a5-1-1", checkers::Req},
    {"a5-1-2", checkers::Req},
    {"a5-1-3", checkers::Req},
    {"a5-1-4", checkers::Req},
    {"a5-1-6", checkers::Adv},
    {"a5-1-7", checkers::Req},
    {"a5-1-8", checkers::Adv},
    {"a5-1-9", checkers::Adv},
    {"m5-2-2", checkers::Req},
    {"m5-2-3", checkers::Adv},
    {"a5-2-1", checkers::Adv},
    {"a5-2-2", checkers::Req},
    {"a5-2-3", checkers::Req},
    {"m5-2-6", checkers::Req},
    {"a5-2-4", checkers::Req},
    {"a5-2-6", checkers::Req},
    {"m5-2-8", checkers::Req},
    {"m5-2-9", checkers::Req},
    {"m5-2-10", checkers::Req},
    {"m5-2-11", checkers::Req},
    {"a5-2-5", checkers::Req},
    {"m5-2-12", checkers::Req},
    {"m5-3-1", checkers::Req},
    {"m5-3-2", checkers::Req},
    {"m5-3-3", checkers::Req},
    {"m5-3-4", checkers::Req},
    {"a5-3-1", checkers::Req},
    {"a5-3-2", checkers::Req},
    {"a5-3-3", checkers::Req},
    {"a5-5-1", checkers::Req},
    {"a5-6-1", checkers::Req},
    {"m5-8-1", checkers::Req},
    {"a5-10-1", checkers::Req},
    {"m5-14-1", checkers::Req},
    {"a5-16-1", checkers::Req},
    {"m5-18-1", checkers::Req},
    {"m5-19-1", checkers::Req},
    {"m6-2-1", checkers::Req},
    {"a6-2-1", checkers::Req},
    {"a6-2-2", checkers::Req},
    {"m6-2-2", checkers::Req},
    {"m6-2-3", checkers::Req},
    {"m6-3-1", checkers::Req},
    {"m6-4-1", checkers::Req},
    {"m6-4-2", checkers::Req},
    {"m6-4-3", checkers::Req},
    {"m6-4-4", checkers::Req},
    {"m6-4-5", checkers::Req},
    {"m6-4-6", checkers::Req},
    {"m6-4-7", checkers::Req},
    {"a6-4-1", checkers::Req},
    {"a6-5-1", checkers::Req},
    {"a6-5-2", checkers::Req},
    {"m6-5-2", checkers::Req},
    {"m6-5-3", checkers::Req},
    {"m6-5-4", checkers::Req},
    {"m6-5-5", checkers::Req},
    {"m6-5-6", checkers::Req},
    {"a6-5-3", checkers::Adv},
    {"a6-5-4", checkers::Adv},
    {"a6-6-1", checkers::Req},
    {"m6-6-1", checkers::Req},
    {"m6-6-2", checkers::Req},
    {"m6-6-3", checkers::Req},
    {"a7-1-1", checkers::Req},
    {"a7-1-2", checkers::Req},
    {"m7-1-2", checkers::Req},
    {"a7-1-3", checkers::Req},
    {"a7-1-4", checkers::Req},
    {"a7-1-5", checkers::Req},
    {"a7-1-6", checkers::Req},
    {"a7-1-7", checkers::Req},
    {"a7-1-8", checkers::Req},
    {"a7-1-9", checkers::Req},
    {"a7-2-1", checkers::Req},
    {"a7-2-2", checkers::Req},
    {"a7-2-3", checkers::Req},
    {"a7-2-4", checkers::Req},
    {"m7-3-1", checkers::Req},
    {"m7-3-2", checkers::Req},
    {"m7-3-3", checkers::Req},
    {"m7-3-4", checkers::Req},
    {"a7-3-1", checkers::Req},
    {"m7-3-6", checkers::Req},
    {"a7-4-1", checkers::Req},
    {"m7-4-2", checkers::Req},
    {"m7-4-3", checkers::Req},
    {"a7-5-1", checkers::Req},
    {"a7-5-2", checkers::Req},
    {"a7-6-1", checkers::Req},
    {"m8-0-1", checkers::Req},
    {"a8-2-1", checkers::Req},
    {"m8-3-1", checkers::Req},
    {"a8-4-1", checkers::Req},
    {"m8-4-2", checkers::Req},
    {"a8-4-2", checkers::Req},
    {"m8-4-4", checkers::Req},
    {"a8-4-4", checkers::Adv},
    {"a8-4-5", checkers::Req},
    {"a8-4-6", checkers::Req},
    {"a8-4-7", checkers::Req},
    {"a8-4-8", checkers::Req},
    {"a8-4-9", checkers::Req},
    {"a8-4-10", checkers::Req},
    {"a8-4-11", checkers::Req},
    {"a8-4-12", checkers::Req},
    {"a8-4-13", checkers::Req},
    {"a8-4-14", checkers::Req},
    {"a8-5-0", checkers::Req},
    {"a8-5-1", checkers::Req},
    {"m8-5-2", checkers::Req},
    {"a8-5-2", checkers::Req},
    {"a8-5-3", checkers::Req},
    {"a8-5-4", checkers::Adv},
    {"m9-3-1", checkers::Req},
    {"a9-3-1", checkers::Req},
    {"m9-3-3", checkers::Req},
    {"a9-5-1", checkers::Req},
    {"a9-6-1", checkers::Req},
    {"m9-6-4", checkers::Req},
    {"a10-1-1", checkers::Req},
    {"m10-1-1", checkers::Adv},
    {"m10-1-2", checkers::Req},
    {"m10-1-3", checkers::Req},
    {"m10-2-1", checkers::Adv},
    {"a10-2-1", checkers::Req},
    {"a10-3-1", checkers::Req},
    {"a10-3-2", checkers::Req},
    {"a10-3-3", checkers::Req},
    {"a10-3-5", checkers::Req},
    {"m10-3-3", checkers::Req},
    {"a10-4-1", checkers::Req},
    {"m11-0-1", checkers::Req},
    {"a11-0-1", checkers::Adv},
    {"a11-0-2", checkers::Req},
    {"a11-3-1", checkers::Req},
    {"a12-0-1", checkers::Req},
    {"a12-0-2", checkers::Req},
    {"a12-1-1", checkers::Req},
    {"m12-1-1", checkers::Req},
    {"a12-1-2", checkers::Req},
    {"a12-1-3", checkers::Req},
    {"a12-1-4", checkers::Req},
    {"a12-1-5", checkers::Req},
    {"a12-1-6", checkers::Req},
    {"a12-4-1", checkers::Req},
    {"a12-4-2", checkers::Adv},
    {"a12-6-1", checkers::Req},
    {"a12-7-1", checkers::Req},
    {"a12-8-1", checkers::Req},
    {"a12-8-2", checkers::Adv},
    {"a12-8-3", checkers::Req},
    {"a12-8-4", checkers::Req},
    {"a12-8-5", checkers::Req},
    {"a12-8-6", checkers::Req},
    {"a12-8-7", checkers::Adv},
    {"a13-1-2", checkers::Req},
    {"a13-1-3", checkers::Req},
    {"a13-2-1", checkers::Req},
    {"a13-2-2", checkers::Req},
    {"a13-2-3", checkers::Req},
    {"a13-3-1", checkers::Req},
    {"a13-5-1", checkers::Req},
    {"a13-5-2", checkers::Req},
    {"a13-5-3", checkers::Adv},
    {"a13-5-4", checkers::Req},
    {"a13-5-5", checkers::Req},
    {"a13-6-1", checkers::Req},
    {"a14-1-1", checkers::Adv},
    {"a14-5-1", checkers::Req},
    {"a14-5-2", checkers::Req},
    {"a14-5-3", checkers::Req},
    {"m14-5-3", checkers::Req},
    {"m14-6-1", checkers::Req},
    {"a14-7-1", checkers::Req},
    {"a14-7-2", checkers::Req},
    {"a14-8-2", checkers::Req},
    {"a15-0-2", checkers::Req},
    {"a15-1-2", checkers::Req},
    {"m15-0-3", checkers::Req},
    {"m15-1-1", checkers::Req},
    {"m15-1-2", checkers::Req},
    {"m15-1-3", checkers::Req},
    {"a15-1-3", checkers::Adv},
    {"a15-1-4", checkers::Req},
    {"a15-2-1", checkers::Req},
    {"a15-2-2", checkers::Req},
    {"m15-3-1", checkers::Req},
    {"a15-3-2", checkers::Req},
    {"a15-3-3", checkers::Req},
    {"m15-3-3", checkers::Req},
    {"m15-3-4", checkers::Req},
    {"a15-3-5", checkers::Req},
    {"m15-3-6", checkers::Req},
    {"m15-3-7", checkers::Req},
    {"a15-4-1", checkers::Req},
    {"a15-4-2", checkers::Req},
    {"a15-4-3", checkers::Req},
    {"a15-4-4", checkers::Req},
    {"a15-4-5", checkers::Req},
    {"a15-5-1", checkers::Req},
    {"a15-5-2", checkers::Req},
    {"a15-5-3", checkers::Req},
    {"a16-0-1", checkers::Req},
    {"m16-0-1", checkers::Req},
    {"m16-0-2", checkers::Req},
    {"m16-0-5", checkers::Req},
    {"m16-0-6", checkers::Req},
    {"m16-0-7", checkers::Req},
    {"m16-0-8", checkers::Req},
    {"m16-1-1", checkers::Req},
    {"m16-1-2", checkers::Req},
    {"m16-2-3", checkers::Req},
    {"a16-2-1", checkers::Req},
    {"a16-2-2", checkers::Req},
    {"a16-2-3", checkers::Req},
    {"m16-3-1", checkers::Req},
    {"m16-3-2", checkers::Adv},
    {"a16-6-1", checkers::Req},
    {"a16-7-1", checkers::Req},
    {"a17-0-1", checkers::Req},
    {"m17-0-2", checkers::Req},
    {"m17-0-3", checkers::Req},
    {"m17-0-5", checkers::Req},
    {"a17-1-1", checkers::Req},
    {"a17-6-1", checkers::Req},
    {"a18-0-1", checkers::Req},
    {"a18-0-2", checkers::Req},
    {"m18-0-3", checkers::Req},
    {"m18-0-4", checkers::Req},
    {"m18-0-5", checkers::Req},
    {"a18-0-3", checkers::Req},
    {"a18-1-1", checkers::Req},
    {"a18-1-2", checkers::Req},
    {"a18-1-3", checkers::Req},
    {"a18-1-4", checkers::Req},
    {"a18-1-6", checkers::Req},
    {"m18-2-1", checkers::Req},
    {"a18-5-1", checkers::Req},
    {"a18-5-2", checkers::Req},
    {"a18-5-3", checkers::Req},
    {"a18-5-4", checkers::Req},
    {"a18-5-5", checkers::Req},
    {"a18-5-6", checkers::Req},
    {"a18-5-7", checkers::Req},
    {"a18-5-8", checkers::Req},
    {"a18-5-9", checkers::Req},
    {"a18-5-10", checkers::Req},
    {"a18-5-11", checkers::Req},
    {"m18-7-1", checkers::Req},
    {"a18-9-1", checkers::Req},
    {"a18-9-2", checkers::Req},
    {"a18-9-3", checkers::Req},
    {"a18-9-4", checkers::Req},
    {"m19-3-1", checkers::Req},
    {"a20-8-1", checkers::Req},
    {"a20-8-2", checkers::Req},
    {"a20-8-3", checkers::Req},
    {"a20-8-4", checkers::Req},
    {"a20-8-5", checkers::Req},
    {"a20-8-6", checkers::Req},
    {"a20-8-7", checkers::Req},
    {"a21-8-1", checkers::Req},
    {"a23-0-1", checkers::Req},
    {"a23-0-2", checkers::Req},
    {"a25-1-1", checkers::Req},
    {"a25-4-1", checkers::Req},
    {"a26-5-1", checkers::Req},
    {"a26-5-2", checkers::Req},
    {"m27-0-1", checkers::Req},
    {"a27-0-1", checkers::Req},
    {"a27-0-4", checkers::Req},
    {"a27-0-2", checkers::Adv},
    {"a27-0-3", checkers::Req},
};

std::vector<checkers::Info> checkers::certCInfo{
    {"PRE30-C", "L3"},
    {"PRE31-C", "L3"},
    {"PRE32-C", "L3"},
    {"DCL30-C", "L2"},
    {"DCL31-C", "L3"},
    {"DCL36-C", "L2"},
    {"DCL37-C", "L3"},
    {"DCL38-C", "L3"},
    {"DCL39-C", "L3"},
    {"DCL40-C", "L3"},
    {"DCL41-C", "L3"},
    {"EXP30-C", "L2"},
    {"EXP32-C", "L2"},
    {"EXP33-C", "L1"},
    {"EXP34-C", "L1"},
    {"EXP35-C", "L3"},
    {"EXP36-C", "L3"},
    {"EXP37-C", "L3"},
    {"EXP39-C", "L3"},
    {"EXP40-C", "L3"},
    {"EXP42-C", "L2"},
    {"EXP43-C", "L3"},
    {"EXP44-C", "L3"},
    {"EXP45-C", "L2"},
    {"EXP46-C", "L2"},
    {"INT30-C", "L2"},
    {"INT31-C", "L2"},
    {"INT32-C", "L2"},
    {"INT33-C", "L2"},
    {"INT34-C", "L3"},
    {"INT35-C", "L3"},
    {"INT36-C", "L3"},
    {"FLP30-C", "L2"},
    {"FLP32-C", "L2"},
    {"FLP34-C", "L3"},
    {"FLP36-C", "L3"},
    {"FLP37-C", "L3"},
    {"ARR30-C", "L2"},
    {"ARR32-C", "L2"},
    {"ARR36-C", "L2"},
    {"ARR37-C", "L2"},
    {"ARR38-C", "L1"},
    {"ARR39-C", "L2"},
    {"STR30-C", "L2"},
    {"STR31-C", "L1"},
    {"STR32-C", "L1"},
    {"STR34-C", "L2"},
    {"STR37-C", "L3"},
    {"STR38-C", "L1"},
    {"MEM30-C", "L1"},
    {"MEM31-C", "L2"},
    {"MEM33-C", "L3"},
    {"MEM34-C", "L1"},
    {"MEM35-C", "L2"},
    {"MEM36-C", "L3"},
    {"FIO30-C", "L1"},
    {"FIO32-C", "L3"},
    {"FIO34-C", "L1"},
    {"FIO37-C", "L1"},
    {"FIO38-C", "L3"},
    {"FIO39-C", "L2"},
    {"FIO40-C", "L3"},
    {"FIO41-C", "L3"},
    {"FIO42-C", "L3"},
    {"FIO44-C", "L3"},
    {"FIO45-C", "L2"},
    {"FIO46-C", "L3"},
    {"FIO47-C", "L2"},
    {"ENV30-C", "L3"},
    {"ENV31-C", "L3"},
    {"ENV32-C", "L1"},
    {"ENV33-C", "L1"},
    {"ENV34-C", "L3"},
    {"SIG30-C", "L1"},
    {"SIG31-C", "L2"},
    {"SIG34-C", "L3"},
    {"SIG35-C", "L3"},
    {"ERR30-C", "L2"},
    {"ERR32-C", "L3"},
    {"ERR33-C", "L1"},
    {"CON30-C", "L3"},
    {"CON31-C", "L3"},
    {"CON32-C", "L2"},
    {"CON33-C", "L3"},
    {"CON34-C", "L3"},
    {"CON35-C", "L3"},
    {"CON36-C", "L3"},
    {"CON37-C", "L2"},
    {"CON38-C", "L3"},
    {"CON39-C", "L2"},
    {"CON40-C", "L2"},
    {"CON41-C", "L3"},
    {"MSC30-C", "L2"},
    {"MSC32-C", "L1"},
    {"MSC33-C", "L1"},
    {"MSC37-C", "L2"},
    {"MSC38-C", "L3"},
    {"MSC39-C", "L3"},
    {"MSC40-C", "L3"},
};

std::vector<checkers::Info> checkers::certCppInfo{
    {"DCL50-CPP", "L1"},
    {"DCL51-CPP", "L3"},
    {"DCL52-CPP", "L3"},
    {"DCL53-CPP", "L3"},
    {"DCL54-CPP", "L2"},
    {"DCL55-CPP", "L3"},
    {"DCL56-CPP", "L3"},
    {"DCL57-CPP", "L3"},
    {"DCL58-CPP", "L3"},
    {"DCL59-CPP", "L3"},
    {"DCL60-CPP", "L3"},
    {"EXP50-CPP", "L2"},
    {"EXP51-CPP", "L3"},
    {"EXP52-CPP", "L3"},
    {"EXP53-CPP", "L1"},
    {"EXP54-CPP", "L2"},
    {"EXP55-CPP", "L2"},
    {"EXP56-CPP", "L3"},
    {"EXP57-CPP", "L3"},
    {"EXP58-CPP", "L3"},
    {"EXP59-CPP", "L3"},
    {"EXP60-CPP", "L1"},
    {"EXP61-CPP", "L2"},
    {"EXP62-CPP", "L2"},
    {"EXP63-CPP", "L2"},
    {"INT50-CPP", "L3"},
    {"CTR50-CPP", "L2"},
    {"CTR51-CPP", "L2"},
    {"CTR52-CPP", "L1"},
    {"CTR53-CPP", "L2"},
    {"CTR54-CPP", "L2"},
    {"CTR55-CPP", "L1"},
    {"CTR56-CPP", "L2"},
    {"CTR57-CPP", "L3"},
    {"CTR58-CPP", "L3"},
    {"STR50-CPP", "L1"},
    {"STR51-CPP", "L1"},
    {"STR52-CPP", "L2"},
    {"STR53-CPP", "L2"},
    {"MEM50-CPP", "L1"},
    {"MEM51-CPP", "L1"},
    {"MEM52-CPP", "L1"},
    {"MEM53-CPP", "L1"},
    {"MEM54-CPP", "L1"},
    {"MEM55-CPP", "L1"},
    {"MEM56-CPP", "L1"},
    {"MEM57-CPP", "L2"},
    {"FIO50-CPP", "L2"},
    {"FIO51-CPP", "L3"},
    {"ERR50-CPP", "L3"},
    {"ERR51-CPP", "L3"},
    {"ERR52-CPP", "L3"},
    {"ERR53-CPP", "L3"},
    {"ERR54-CPP", "L1"},
    {"ERR55-CPP", "L2"},
    {"ERR56-CPP", "L2"},
    {"ERR57-CPP", "L3"},
    {"ERR58-CPP", "L2"},
    {"ERR59-CPP", "L1"},
    {"ERR60-CPP", "L3"},
    {"ERR61-CPP", "L3"},
    {"ERR62-CPP", "L3"},
    {"OOP50-CPP", "L3"},
    {"OOP51-CPP", "L3"},
    {"OOP52-CPP", "L2"},
    {"OOP53-CPP", "L3"},
    {"OOP54-CPP", "L3"},
    {"OOP55-CPP", "L2"},
    {"OOP56-CPP", "L3"},
    {"OOP57-CPP", "L2"},
    {"OOP58-CPP", "L2"},
    {"CON50-CPP", "L3"},
    {"CON51-CPP", "L2"},
    {"CON52-CPP", "L2"},
    {"CON53-CPP", "L3"},
    {"CON54-CPP", "L3"},
    {"CON55-CPP", "L3"},
    {"CON56-CPP", "L3"},
    {"MSC50-CPP", "L2"},
    {"MSC51-CPP", "L1"},
    {"MSC52-CPP", "L3"},
    {"MSC53-CPP", "L2"},
    {"MSC54-CPP", "L2"},
};

""")


